<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
	<!-- // <script src="http://code.jquery.com/jquery-latest.js"></script> -->
	<script type="text/javascript" src="../jquery-2.1.4.js"></script>
	<script type="text/javascript">
			window.onload = function(){

				function fn1(parameter) { //回调一
					console.log("fn1 : " + parameter);
				}

				function fn2(parameter) { //回调二执行流程
					console.log("fn2 : " + parameter);
				}


				function fn3(parameter) { //回调二执行流程
					console.log("fn3 : " + parameter);
				}

				var callbacks = $.Callbacks( "memory" );
				callbacks.add( fn1 );
				callbacks.fire( "foo" );
				callbacks.add( fn2 );
				// callbacks.fire( "bar" );
				// callbacks.remove( fn2 );
				// callbacks.fire( "foobar" );
				// callbacks.remove( fn2 );
				// callbacks.fire( "c" );


				// console.log(callbacks)

			}

	</script>
</head>
<body>
<div>
	<p>子元素</p>
</div>
</body>
</html>